/**
 * 
 */
package cn.biplam.front.component.view.mainpage;

import cn.biplam.common.wrapper.ErrorMessage;
import cn.biplam.common.wrapper.UserInfo;
import cn.biplam.front.component.AjxResponse;
import cn.biplam.front.component.data.common.CaptionComp;
import cn.biplam.front.component.view.ViewComponent;
import cn.biplam.front.html.HtmlText;
import cn.biplam.front.html.base.HtmlWindow;

/**
 * 用户称呼(CallName+您好：)
 * @author 	WangSong
 * @create 	2009-4-17 下午02:53:11
 * @version 1.0
 */
public class UserCall extends AjxResponse implements ViewComponent{
	
	private final String sComponentID="9991";
	private HtmlText text;
	
	public UserCall(){
	}
	
	/**
	 * 
	 * @param mUser
	 * @param sHomeUrl
	 * @return HtmlWindow
	 * @throws ErrorMessage
	 */
	public HtmlWindow get(UserInfo mUser,String sHomeUrl) throws ErrorMessage{
		this.text=new HtmlText(this.sComponentID,"st",mUser.getUserCallName()+" "+CaptionComp.get(mUser,"191"));
		this.text.setMarginTop("1");
		return text;
	}

	/**
	 * 
	 * @return
	 * @throws ErrorMessage
	 */
	@Override
	protected HtmlWindow ajxGet() throws ErrorMessage {
		return this.get(mUser, sHomeUrl);
	}
}
